﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace IMCOM.Imagiality.ImageProcessing.Canvas2D.Commands
{
    public class ZoomFitCommand : CanvasImageCommand
    {
        private double scalingFactor;

        public double ScalingFactor
        {
            get { return scalingFactor; }
            set { scalingFactor = value; }
        }

        public ZoomFitCommand(double scalingFactor)
        {
            ScalingFactor = scalingFactor;
        }
        
        public void Execute(CanvasImageWrapper canvasImageWrapper)
        {
            if (ScalingFactor > 0)
                canvasImageWrapper.ScalingFactor = ScalingFactor;
        }
    }
}
